<?php

namespace App\Http\Controllers\home;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

use DB;

class PayController extends Controller
{
    public function update(Request $request)
    {
        $e=array('state'=>2);
        for($i=0;$i<$request->input('num');$i++){
            $row=DB::table('order')->where('id',$request->input("id_".$i))->update($e);
        }
        return redirect('/home1/order');
    }
}
